package cn.dansj.common.utils.bean;

import cn.dansj.common.utils.transfer.DefaultMethods;

import java.io.Serializable;

public class ResponseMessage extends DefaultMethods implements Serializable {
    private int responseCode = 200;
    private String message;

    public static ResponseMessage getInstance() {
        return new ResponseMessage();
    }

    public ResponseMessage responseCode(int code) {
        this.responseCode = code;
        return this;
    }

    public ResponseMessage message(String message) {
        this.message = message;
        return this;
    }

    public int getResponseCode() {
        return responseCode;
    }

    public String getMessage() {
        return message;
    }

    public boolean getStatus() {
        return responseCode == 1 || responseCode == 200;
    }
}
